/*
 * BleCheck.H
 *
 *  Created on: May 16, 2024
 *      Author: hongwei_zhu
 */

#ifndef SRC_TOOL_BLECHECK_H_
#define SRC_TOOL_BLECHECK_H_

#include "config.h"
#include "string.h"

#include "FreeRTOS.h"
#include "semphr.h"


enum BLE_state_type {
    DISCONNECTED = 0,
    CONNECTED
};

struct AMessage
{
    uint16_t ucMessageLEN;
    uint8_t ucData[ 247 ];
};


uint8_t checkBLEname(void);
uint8_t changeBLEname(uint8_t *name);
void setBLEDefaultname(void);
void Ble_enable(void);
int Ble_receive(uint8_t *buf);
int Ble_txSend(uint8_t *buf,uint16_t len);
enum BLE_state_type Ble_get_state(void);

extern QueueHandle_t ble_Queue;
extern QueueHandle_t ble_TxQueue;
extern volatile enum BLE_state_type  ble_state;
#endif /* SRC_TOOL_BLECHECK_H_ */
